import 'package:flutter/material.dart';
import 'package:theme_diy/MyHomePage.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      //全局主题
      theme: ThemeData(
        brightness: Brightness.dark,//明暗模式
        accentColor: Colors.yellow,//前景色
        primaryColor: Colors.cyan,
        iconTheme: IconThemeData(color: Colors.yellow),//icon主题色
        textTheme: TextTheme(bodyText2: TextStyle(color: Colors.brown)),//文本颜色
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}


